#pragma once

#include "Util.h"

#ifdef USE_THREADS
#include <boost/thread/thread.hpp>
#endif 

#include <map>

using namespace std; 
//this file is provided by matlab
#include "Util.h"

#ifdef	USE_MATLAB
#include "engine.h"
#endif 

namespace matlab
{
class MatlabInterface
{
public:
	MatlabInterface(void);
	virtual ~MatlabInterface(void);

#ifdef USE_MATLAB
	Engine* getEngine(); 
#endif

	static void closeEngines(); 

public:

#ifdef USE_MATLAB

#ifdef USE_THREADS
	static map< boost::thread::id,Engine *> eps; 				
#else
	static Engine* engine; 
#endif 

#endif //use matlab

	static int instances;			//how many instances of this class are created

};

}
